Attribute VB_Name = "modMiniX2Support"
Option Explicit


Public indInterlockStatus As Byte

Public DppConfig As DppConfigType

Public HwCfgDP5 As String
Public cstrRawCfgIn As String
Public HwCfgReady As Boolean
Public HwCfgExReady As Boolean
Public Dp5CmdList As New Collection
Public HwCfgDP5Out As String
Public HwRdBkDP5Out As String

' Shared Communications Interface Settings
Public isDppConnected As Boolean            ' CurrentInterface selected and device found
Public CurrentInterface As Byte             ' selected communications interface (0=RS232/1=USB/2=ETHERNET)
Public ComPort As Long                      ' Serial Port Settings

Public Type DppConfigType
    CfgReadBack As Boolean       'load dpp config into config editor
    DisplayCfg As Boolean        'show dpp config in msgbox dialog
    bSpectrumCfg As Boolean      'create dpp mca file config
End Type

Public Type TubeInterlockTableType
    PartNumber As String
    SerialNumber As String
    HVmin_kV As Single
    HVmax_kV As Single
    Imin_uA As Single
    Imax_uA As Single
    Pmax_Anode_W As Single
    
'''    HVmin_kV_Alt As Single
'''    HVmax_kV_Alt As Single
'''    Imin_uA_Alt As Single
'''    Imax_uA_Alt As Single
'''    Pmax_Anode_W_Alt As Single

    HVscale_kVperV As Single
    Iscale_uAperV As Single

    Interlock_Voltage_V As Single
    Interlock_min_I_mA As Single
    Interlock_max_I_mA As Single
    
    Tube_Supply_Min_V As Single
    Tube_Supply_Max_V As Single

    Description As String
End Type

Public TubeInterlockTable As TubeInterlockTableType

